//
//  BaseViewController.swift
//  微博项目
//
//  Created by Mac on 2017/5/31.
//  Copyright © 2017年 Mac. All rights reserved.
//

import UIKit

class BaseViewController: UITableViewController {
    
    // 懒加载属性
    lazy var visitorView:VisitorView = VisitorView.visitorView()!
    var isLogin:Bool = false
    
    override func loadView() {
        isLogin ? super.loadView() : setupVisitorView()
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }

    // MARK: - Table view data source

    override func numberOfSections(in tableView: UITableView) -> Int {
        return 0
    }

    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 0
    }

}

extension BaseViewController{
    fileprivate func setupVisitorView(){
       visitorView.backgroundColor = UIColor.red
       view = visitorView
    }
}
